using System;
using System.Data;
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;
using DataObject.Helpers;

namespace DataObject.Model
{
	[Serializable]
	public class ReservationDetailDTO : DTOBase
	{
        public ReservationDetailDTO()
        {
            RDID = Helper.NewSeqGuid();
        }

		#region Reference property Members

		private ReservationDTO _reservation = new ReservationDTO();
		public ReservationDTO Reservation
		{
			get
			{
				return _reservation;
			}
			set
			{
				if (_reservation != value)
				{
					_reservation = value;
				}
			}
		}

		#endregion

		#region Collection Members

		private IList<CabinStatusDTO> _cabinStatusCollection = new List<CabinStatusDTO>();
		public IList<CabinStatusDTO> CabinStatusCollection
		{
			get
			{
				return _cabinStatusCollection;
			}
			set
			{
				if (_cabinStatusCollection != value)
				{
					_cabinStatusCollection = value;
					OnChanged();
				}
			}
		}

		#endregion

		#region Property CabinID

		private int _cabinID;

		/// <summary>
		///  Property CabinID
		/// <summary>
		public int CabinID
		{
			get
			{
				return _cabinID;
			}

			set
			{
				if (_cabinID != value)
				{
					this.OnCabinIDChanging(value);
					_cabinID = value;
					this.OnCabinIDChanged();
					OnChanged();
				}
			}
		}

		#endregion

        #region Property CabinPrice

        private decimal _cabinPrice;

        /// <summary>
        ///  Property CabinPrice
        /// <summary>
        public decimal CabinPrice
        {
            get
            {
                return _cabinPrice;
            }

            set
            {
                if (_cabinPrice != value)
                {
                    this.OnCabinPriceChanging(value);
                    _cabinPrice = value;
                    this.OnCabinPriceChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property UnitPrice

        private decimal? _unitPrice;

        /// <summary>
        ///  Property UnitPrice
        /// <summary>
        public decimal? UnitPrice
        {
            get
            {
                return _unitPrice;
            }

            set
            {
                if (_unitPrice != value)
                {
                    this.OnUnitPriceChanging(value);
                    _unitPrice = value;
                    this.OnUnitPriceChanged();
                    OnChanged();
                }
            }
        }

        #endregion

        #region Property CabinStatus

		private int _cabinStatus;

		/// <summary>
		///  Property CabinStatus
		/// <summary>
		public int CabinStatus
		{
			get
			{
				return _cabinStatus;
			}

			set
			{
				if (_cabinStatus != value)
				{
					this.OnCabinStatusChanging(value);
					_cabinStatus = value;
					this.OnCabinStatusChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Note

		private string _note;

		/// <summary>
		///  Property Note
		/// <summary>
		public string Note
		{
			get
			{
				return _note;
			}

			set
			{
				if (_note != value)
				{
					this.OnNoteChanging(value);
					_note = value;
					this.OnNoteChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property NumOfPeople

		private int _numOfPeople;

		/// <summary>
		///  Property NumOfPeople
		/// <summary>
		public int NumOfPeople
		{
			get
			{
				return _numOfPeople;
			}

			set
			{
				if (_numOfPeople != value)
				{
					this.OnNumOfPeopleChanging(value);
					_numOfPeople = value;
					this.OnNumOfPeopleChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property RDID

		private Guid _rDID;

		/// <summary>
		///  Property RDID
		/// <summary>
		public Guid RDID
		{
			get
			{
				return _rDID;
			}

			set
			{
				if (_rDID != value)
				{
					this.OnRDIDChanging(value);
					_rDID = value;
					this.OnRDIDChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Representative

		private string _representative;

		/// <summary>
		///  Property Representative
		/// <summary>
		public string Representative
		{
			get
			{
				return _representative;
			}

			set
			{
				if (_representative != value)
				{
					this.OnRepresentativeChanging(value);
					_representative = value;
					this.OnRepresentativeChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ReservationID

		private Guid _reservationID;

		/// <summary>
		///  Property ReservationID
		/// <summary>
		public Guid ReservationID
		{
			get
			{
				return _reservationID;
			}

			set
			{
				if (_reservationID != value)
				{
					this.OnReservationIDChanging(value);
					_reservationID = value;
					this.OnReservationIDChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Status

		private int _status;

		/// <summary>
		///  Property Status
		/// <summary>
		public int Status
		{
			get
			{
				return _status;
			}

			set
			{
				if (_status != value)
				{
					this.OnStatusChanging(value);
					_status = value;
					this.OnStatusChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Extensibility Method Declarations

		protected virtual void OnCabinIDChanging(int cabinID) { }
        protected virtual void OnCabinIDChanged() { }
        protected virtual void OnCabinPriceChanging(decimal cabinPrice) { }
        protected virtual void OnCabinPriceChanged() { }
        protected virtual void OnUnitPriceChanging(decimal? unitPrice) { }
        protected virtual void OnUnitPriceChanged() { }
		protected virtual void OnCabinStatusChanging(int cabinStatus) { }
		protected virtual void OnCabinStatusChanged() { }
		protected virtual void OnNoteChanging(string note) { }
		protected virtual void OnNoteChanged() { }
		protected virtual void OnNumOfPeopleChanging(int numOfPeople) { }
		protected virtual void OnNumOfPeopleChanged() { }
		protected virtual void OnRDIDChanging(Guid rDID) { }
		protected virtual void OnRDIDChanged() { }
		protected virtual void OnRepresentativeChanging(string representative) { }
		protected virtual void OnRepresentativeChanged() { }
		protected virtual void OnReservationIDChanging(Guid reservationID) { }
		protected virtual void OnReservationIDChanged() { }
		protected virtual void OnStatusChanging(int status) { }
		protected virtual void OnStatusChanged() { }

		#endregion

	}
}
